import request from '@/utils/request'

// 通过code编码查询
export function getColumnByCode(params) {
	return request({
		url: '/columnContent/getByCode/noAuth',
		method: 'get',
		params: params
	})
}

// 获取树形数据
export function getColumnPage(params) {
	return request({
		url: '/column/getTree',
		method: 'get',
		params: params
	})
}

// 上传图片
export function uploadRichImg(data) {
	return request({
		url: '/columnContent/addCoverImg',
		method: 'post',
		data: data,
		headers: {
			"Content-Type": "multipart/form-data"
		}
	})
}
// 上传富文本文件
export function uploadRichFile(data) {
	return request({
		url: '/columnContent/addRichFile',
		method: 'post',
		data: data,
		headers: {
			"Content-Type": "multipart/form-data"
		}
	})
}


// 通过主键修改
export function updColumn(data) {
	return request({
		url: '/columnContent/upd',
		method: 'post',
		data: data
	})
}
